Closing the Current Function or Program

From the Actions menu, click Close.

If the function or program has unstored changes, you are prompted to check syntax and store before closing.